//
//  TSSTBezelWindow.m
//  SimpleComic
//
//  Created by Alexander Rauchfuss on 5/30/07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//



#import "TSSTBezelWindow.h"
#import "NSBezierPath+PXRoundedRectangleAdditions.h"



@implementation TSSTBezelWindow



- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
{
    self = [super initWithContentRect: contentRect styleMask: NSBorderlessWindowMask | NSNonactivatingPanelMask backing: bufferingType defer: flag];
    if(self)
    {
        [self setOpaque: NO];
        [self setIgnoresMouseEvents: YES];
    }
    return self;
}


@end



@implementation TSSTBezelView


- (void)drawRect:(NSRect)aRect
{
    [[NSColor clearColor] set];
    NSRectFill(aRect);
    [[NSColor colorWithCalibratedWhite: 0 alpha: 0.8] set];
    [[NSBezierPath bezierPathWithRoundedRect: [self frame] cornerRadius: 10.0] fill];
}


@end